<?php
class Pauler_Searchseo_Block_Manage_Searchseo_Edit_Form extends Mage_Adminhtml_Block_Catalog_Category_Edit_Form{

   public function __construct()
    {
        parent::__construct();
        $this->setTemplate('pauler_searchseo/manage/edit/form.phtml');
    }
    protected function _prepareForm()
  {
      $form = new Varien_Data_Form(array(
                                      'id' => 'edit_form',
                                      'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
                                      'method' => 'post',
                                   )
      );

      $form->setUseContainer(true);
      $this->setForm($form);
      return parent::_prepareForm();
  }

  protected function _prepareLayout(){
  
       // $category = $this->getCategory();
        //$categoryId = (int) $category->getId(); // 0 when we create category, otherwise some value for editing category

        $this->setChild('tabs',
            $this->getLayout()->createBlock('searchseo/manage_searchseo_tabs', 'tabs')
        );
  }
  public function getTabsHtml()
  {
        return $this->getChildHtml('tabs');
  }
  public function getProductsJson()
    {
        $products = $this->getCategory()->getProductsPosition();
        if (!empty($products)) {
            return Mage::helper('core')->jsonEncode($products);
        }
        return '{}';
    }

}
